<!doctype html>
<html class="no-js fixed-layout">
<head>
    <!-- 公共head Begin -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="keywords" content="萌宠之家-C2B2C社会化电商平台" />
    <meta name="description" content="《萌宠之家-C2B2C社会化电商平台》是一个基于宠物社区的一站式电商平台。" />
    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0, maximum-scale=1.0">

    <title>萌宠之家-C2B2C社会化电商平台->运营后台</title>

    <!-- Set render engine for 360 browser -->
    <meta name="renderer" content="webkit">

    <!-- No Baidu Siteapp-->
    <meta http-equiv="Cache-Control" content="no-siteapp"/>

    <link rel="icon" type="image/png" href="../statics/img/favicon.png">

    <!-- Add to homescreen for Chrome on Android -->
    <meta name="mobile-web-app-capable" content="yes">
    <link rel="icon" sizes="192x192" href="../statics/img/app-icon72x72@2x.png">

    <!-- Add to homescreen for Safari on iOS -->
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-title" content="Pet Mall"/>
    <link rel="apple-touch-icon-precomposed" href="../statics/img/app-icon72x72@2x.png">

    <!-- Tile icon for Win8 (144x144 + tile color) -->
    <meta name="msapplication-TileImage" content="../statics/img/app-icon72x72@2x.png">
    <meta name="msapplication-TileColor" content="#0e90d2">

    <link rel="stylesheet" href="../statics/AmazeUI/assets/css/amazeui.min.css">
    <link rel="stylesheet" href="../statics/AmazeUI/assets/css/admin.css">
    <link rel="stylesheet" href="../statics/AmazeUI/assets/css/app.css">

    <!--[if (gte IE 9)|!(IE)]><!-->
    <script src="../statics/AmazeUI/assets/js/jquery.min.js"></script>
    <!--<![endif]-->
    <script src="../statics/AmazeUI/assets/js/amazeui.js"></script>
    <script src="../statics/AmazeUI/assets/js/amazeui.modal.js"></script>
    <!-- 百度编辑器
    <script type="text/javascript" charset="utf-8" src="../statics/UEditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="../statics/UEditor/ueditor.all.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="../statics/UEditor/lang/zh-cn/zh-cn.js"></script>
    <script type="text/javascript">
        var ue = UE.getEditor('editor',{
                initialFrameWidth:"100%" //初始化选项
                //scaleEnabled:true//scaleEnabled {Boolean} [默认值：false] //是否可以拉伸长高，默认true(当开启时，自动长高失效)
            }
        );
    </script>
     -->
    <script src="../statics/AmazeUI/assets/js/validator.js"></script>
    <script src="../statics/js/plugin/jquery.livequery.js"></script>
    <!-- 此处form的导入和amazeui.min.js会有冲突，请根据需要使用
    <script src="statics/js/plugin/jquery.form.js"></script>
     -->
    <!--
    <script>
        $().ready( function() {
            AMUI.plugin('mySelected', AMUI.selected);
            $('[data-am-selected]').mySelected({btnWidth: '100%', maxHeight: '200px', btnSize: 'sm', btnStyle: 'secondary'});
        });
    </script>
    -->
    <script src="../statics/js/plugin/jquery.metadata.js"></script>
    <script src="../statics/js/base.js"></script>
    <script src="../statics/js/jquery.lSelect.js"></script>
    <!-- 公共head End -->
</head>
<body>
<!--[if lte IE 9]>
<p class="browsehappy">你正在使用<strong>过时</strong>的浏览器，Amaze UI 暂不支持。 请 <a href="http://browsehappy.com/" target="_blank">升级浏览器</a>
    以获得更好的体验！</p>
<![endif]-->

<!-- 网页顶部 Begin -->
<header class="am-topbar am-topbar-inverse admin-header">
    <div class="am-topbar-brand">
        <img src="../statics/img/logo.png" alt="萌宠之家">
    </div>

    <button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-success am-show-sm-only" data-am-collapse="{target: '#topbar-collapse'}">
        <span class="am-sr-only">导航切换</span>
        <span class="am-icon-bars"></span>
    </button>

    <div class="am-collapse am-topbar-collapse" id="topbar-collapse">
        <ul class="am-nav am-nav-pills am-topbar-nav am-topbar-right admin-header-list">
            <li class="am-dropdown" data-am-dropdown>
                <a class="am-dropdown-toggle" data-am-dropdown-toggle href="javascript:;">
                    <span class="am-icon-smile-o"></span>
                    <strong>admin</strong>
                    <span class="am-icon-caret-down"></span>
                </a>
                <ul class="am-dropdown-content">
                    <li><a href="javascript:void(0);" onclick="logout()"><span class="am-icon-power-off"></span> 退出</a></li>
                </ul>
            </li>
        </ul>
    </div>
</header>
<!-- 网页顶部 End -->

<div class="am-cf admin-main">
    <!-- 左侧菜菜单栏 Begin -->
    <div class="admin-sidebar am-offcanvas" id="admin-offcanvas">
        <div class="am-offcanvas-bar admin-offcanvas-bar">
            <ul class="am-list admin-sidebar-list" id="collapase-nav">
                <li class="am-panel"><a href="admin_index.html" target="mainFrame"><span class="am-icon-home"></span> 首页</a></li>
                <li class="am-panel">
                    <a class="am-cf" data-am-collapse="{parent: '#collapase-nav', target: '#collapse-nav-1'}">
                        <span class="am-icon-user">&emsp;会员管理</span>
                        <span class="am-icon-angle-right am-fr am-margin-right"></span>
                    </a>
                    <ul class="am-list am-collapse admin-sidebar-sub" id="collapse-nav-1">
                        <li>
                            <a href="member_list.html" target="mainFrame">
                                <span class="am-icon-building-o">&emsp;会员列表</span>
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="am-panel">
                    <a class="am-cf" data-am-collapse="{parent: '#collapase-nav', target: '#collapse-nav-2'}">
                        <span class="am-icon-heart">&emsp;商品管理</span>
                        <span class="am-icon-angle-right am-fr am-margin-right"></span>
                    </a>
                    <ul class="am-list am-collapse admin-sidebar-sub" id="collapse-nav-2">
                        <li>
                            <a href="product_audit.html" target="mainFrame">
                                <span class="am-icon-credit-card">&emsp;商品审核</span>
                            </a>
                        </li>
                        <li>
                            <a href="product_list.html" target="mainFrame">
                                <span class="am-icon-check-circle-o">&emsp;商品上架</span>
                            </a>
                        </li>
                        <li>
                            <a href="product_category_list.html" target="mainFrame">
                                <span class="am-icon-fax">&emsp;商品分类</span>
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="am-panel">
                    <a class="am-cf" data-am-collapse="{parent: '#collapase-nav', target: '#collapse-nav-3'}">
                        <span class="am-icon-file-text">&emsp;订单管理</span>
                        <span class="am-icon-angle-right am-fr am-margin-right"></span>
                    </a>
                    <ul class="am-list am-collapse admin-sidebar-sub" id="collapse-nav-3">
                        <li>
                            <a href="order_list.html" target="mainFrame">
                                <span class="am-icon-tasks">&emsp;订单列表</span>
                            </a>
                        </li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
    <!-- 左侧菜菜单栏 End -->

    <!-- content start -->
    <div class="admin-content">
        <iframe name="mainFrame" id="mainFrame"  width="100%" height="100%" src="admin_index.html" frameborder="no" border="0" marginwidth="0" marginheight="0" allowtransparency="yes"></iframe>
    </div>
    <!-- content end -->

</div>

<a href="#" class="am-icon-btn am-icon-th-list am-show-sm-only admin-menu" data-am-offcanvas="{target: '#admin-offcanvas'}"></a>
</body>
<script type="text/javascript">
    $(function(){

    });// $(function());

/** 退出系统 **/
function logout(){

    // 当前用户token
    let token = sessionStorage.getItem("token");

    // 判断当前用户是否登录(token是否存在)
    if( !token ) {
        // token不存在的话，就清除session直接退出
        sessionStorage.clear();
        top.location.href = 'admin_login.html';
        return;

    }// if( !token );

    Modal.register(['confirm','alert']);
    Modal.confirm("您确定要退出吗？",{
        relatedTarget: this,
        onConfirm: function(options) {
            $.ajax({
                type: 'POST',
                url: 'http://localhost:8080/user/logout',
                dataType: "json",
                data: { token: token},
                success: function() {

                    sessionStorage.clear();
                    top.location.href = 'admin_login.html';
                    return;

                },
                error: function () {

                    sessionStorage.clear();
                    top.location.href = 'admin_login.html';
                    return;

                }// error: function();
            });// $.ajax();
        }// onConfirm: function(options);

    });// Modal.confirm();

}// logout();
</script>
</html>
